Skip to content

Fix Create Github Release workflow node_modules permissions#429

Merged
turegjorup merged 2 commits into
release/3.0.0from
feature/release-workflow-node-permissions
May 5, 2026
Merged

Fix Create Github Release workflow node_modules permissions#429
turegjorup merged 2 commits into
release/3.0.0from
feature/release-workflow-node-permissions

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Summary

Fixes the Create Github Release workflow failing at Cleanup before packaging because root-owned files from the node compose service could not be removed by the runner.

  • Add overridable user to the node service (defaults to root so local-dev is unchanged).
  • Set COMPOSE_NODE_USER to the runner's UID:GID and pass HOME=/tmp so npm can write its cache when not running as root.
  • Align .dockerignore with the workflow's Cleanup before packaging list (/phpstan-baseline.neon, /playwright/).

Why scoped to a new COMPOSE_NODE_USER instead of reusing COMPOSE_USER: the node:24 image has no built-in non-root user matching the runner UID, while itkdev/php8.4-fpm:alpine does (via runner). Reusing COMPOSE_USER would require touching the eleven other workflows that already rely on it for phpfpm.

Test plan

  • Verified on a fork: tag push of 0.0.0-test3 produced a successful workflow run (1m31s), Cleanup before packaging passed, the GitHub release was created and assets (*.tar.gz, checksum.txt) uploaded.
  • Confirm local docker compose run node … still works unchanged (root default preserved).
  • Maintainer to push a real semver tag against release/3.0.0 after merge to verify end-to-end.

🤖 Generated with Claude Code

The node compose service ran as root, leaving root-owned files in
the bind-mounted node_modules/. The runner-side Cleanup before
packaging step then could not rm them and the release was never
created.

- Add overridable user to the node service (defaults to root so
  local-dev behavior is unchanged).
- Set COMPOSE_NODE_USER to the runner UID:GID and pass HOME=/tmp
  so npm can write its cache when not running as root.
- Align .dockerignore with the workflow's cleanup list
  (phpstan-baseline.neon, /playwright/).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@turegjorup
turegjorup requested a review from tuj May 4, 2026 18:57
@turegjorup turegjorup self-assigned this May 4, 2026

@tuj tuj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown linting

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@turegjorup
turegjorup merged commit df5fdb8 into release/3.0.0 May 5, 2026
17 checks passed
@turegjorup
turegjorup deleted the feature/release-workflow-node-permissions branch May 5, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants